<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../general/header.jsp" %>
		<div id="header">FREE MARKET HOME PAGE</div>
		<%@ include file="../general/menu.jsp" %>
		<h2>Pending confirmations</h2>
		<table class="listas">
			<tr style="font-weight:bold;"> 
				<td> Buyer </td>  
				<td> Seller </td> 
				<td> Item </td> 				 					
				<td> Purchase date </td> 
				<td> Cancel </td>
			</tr>
			<c:forEach var="purchase" items="${purchases}">
				<tr>
					<td> <c:out value="${purchase.user.name}" /></td>  
					<td> <c:out value="${purchase.item.user.name}" /> </td> 
					<td> <c:out value="${purchase.item.name}" /> </td> 				 					
					<td> <fmt:formatDate type="date" value="${purchase.purchaseDate}" /> </td>
					<td><a href="cancelPurchase?purchaseid=${purchase.id}">
							<img class="edit" src="../../img/delete.png" />
						</a>
					</td>
				</tr>
			</c:forEach>
		</table>		
<%@ include file="../general/footer.jsp" %>